<?php

declare(strict_types=1);

namespace App\Wxc\Model;

use Carbon\Carbon;
use Deepwell\HyperfUid\Snowflake;
use Hyperf\Database\Model\SoftDeletes;
use Mine\MineModel;

/**
 * @property int $mp_uid
 * @property string $openid 小程序用户唯一标识
 * @property string $unionid 小程序用户开放平台唯一标标识
 * @property string $session_key 会话密钥
 * @property string $nickname 昵称
 * @property string $avatar 头像url
 * @property Carbon $created_at 创建时间
 * @property Carbon $updated_at 更新时间
 * @property Carbon $deleted_at
 */
class WxcSharerMpUser extends MineModel
{
    use Snowflake;
    use SoftDeletes;

    /**
     * The table associated with the model.
     */
    protected ?string $table = 'wxc_sharer_mp_user';

    protected string $primaryKey = 'mp_uid';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['mp_uid', 'openid', 'unionid', 'session_key', 'nickname', 'avatar', 'created_at', 'updated_at', 'deleted_at'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['mp_uid' => 'string', 'created_at' => 'datetime', 'updated_at' => 'datetime', 'deleted_at' => 'datetime'];
}
